import { request } from "@umijs/max";
import { stringify } from "qs";

//登录
export const login = (params: API.UserLogin) =>
  request("/login", {
    method: "POST",
    data: params,
  });
//登出
export const logout = (params: API.UserLogout) =>
  request(`/logout?${stringify(params)}`, {
    method: "GET",
  });

//修改密码
export const changePwd = (params: any) =>
  request("/user/updatePassword", {
    method: "POST",
    data: params,
  });

//注册
export const register = (params: any) =>
  request("/register", {
    method: "POST",
    data: params,
  });
  